package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024 —03 —04
 * Time: 20:32
 */


public class Booklist {
    private Book[] books ;
    private int usedsize;

    public Booklist() {
        this.books = new Book[10];
        this.books[0] = new Book("三国演义","罗贯中",10,"小说");
        this.books[1] = new Book("西游记","吴承恩",100,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",102,"小说");
        this.usedsize = 3;

        //先放好三本书
    }

    public int getUsedsize() {
        return usedsize;
    }

    public void setUsedsize(int usedsize) {
        this.usedsize = usedsize;
    }

    public Book getBook(int pos){
        return books  [pos];
    }

    public void setBooks(int pos, Book book){
        books[pos] = book;
    }

    public Book[] getBooks(){
        return books;
    }



}
